Ext.define('HRMobile.view.employeeDetails.LicenseForm', {
    extend: 'Ext.Container',
    controllers: ['EmployeeController'],
    config: {
    	 border: true,
    	 style: 'border-left-style: solid;',
    		 items:[
    	 {
    			 xtype: 'fieldset',
    			 height: '100%',
    			 title: 'License',
    			 items: [{
    				 xclass: 'HRMobile.view.employeeDetails.LicenseList',
    				    id: 'licenseList'
    				    }]
    		},
		    {
				 xclass: 'HRMobile.view.employeeDetails.LicenseDetails',
				 id: 'licenseDetails'
				    }
		    ]
    }
});
Ext.define('HRMobile.view.employeeDetails.LicenseList', {
    extend: 'Ext.dataview.List',
    config: {
    	height: '100%',
    	itemTpl: 
    	'<div style="font-size:15px"><b>{licenseName}</b></div>',
    	store: 'LicenseStore',
    	onItemDisclosure: true
    	}
});
Ext.define('HRMobile.view.employeeDetails.LicenseDetails', {
	extend: 'Ext.form.Panel',
    config: {
    	modal: true,
    	centered: true,
    	hideOnMaskTap: true,
    	hidden: true,
    	width: Ext.os.is.Phone?320:450,
    	height: Ext.os.is.Phone?320:400,
    	hideAnimation: {
    		type: 'popOut',
    		duration: 250,
    		easing: 'ease-out'
    	},
    	styleHtmlContent: true,
        defaults: {
            xtype: 'fieldset',
            defaults: {
                xtype: 'textfield',
                readOnly: true,
				labelWidth: '40%',
				labelWrap: true
            }
        },
        items:[{
        	xtype: 'toolbar',
            docked: 'top',
            items: [
                {xtype: 'spacer'},
                {xtype: 'button', 
                 text: 'Done', 
                 handler: function(){Ext.getCmp('licenseDetails').hide();}
                },
            ],
        	   },
               {
               title: 'License Details',
               items: [{
                   label: 'License Type:',
                   name: 'licenseName',
               }, {
                   label: 'Licsense No',
                   name: 'licenseNo',
               }, {
                   label: 'Issued Date:',
                   name: 'licenseIssuedDate',
               },{
                   label: 'Expiry Date:',
                   name: 'licenseExpiryDate',
               }]
        }]
    }
});